<?php

/**
 * Library :: DateTime
 *
 * Provides Utility Classes and Functions for dealing with Date and Time
 * as well as addressing compatability issues between PHP4 and 5.
 *
 * Warlock is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 *
 * @author     David Cole <neophyte@sourcetutor.com>
 * @package    warlock
 * @subpackage library
 * @license    GNU/GPL v2
 *
 */

/**
 * Get Micro Time
 *
 * Emulates the behaviour of microtime() as in
 * PHP5.
 *
 * @param bool $float Just return microseconds.
 */
if (version_compare(phpversion(), '5', '>='))
{
    function DateTime_MicroTime($float)
    {
        return microtime($float);
    }
}
else
{
    function DateTime_MicroTime($float)
    {
        if ($float)
            return array_sum(explode(' ', microtime()));
        else
            return microtime();
    }
}

?>